package com.four.controller;

import com.four.pojo.Car;
import com.four.service.ICarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author 于志豪
 * @create 2021-10-23 10:24
 */

@Controller("carController")
public class CarController {
    @Autowired
    @Qualifier("carServiceImpl")
    private ICarService service;

    @RequestMapping("/findAll")
    public List<Car> findAll (){
        List<Car> all = service.findAll();
        System.out.println();
        return all;
    }

}
